package com.tianji.promotion.service;

import com.tianji.promotion.domain.dto.UserCouponDTO;
import com.tianji.promotion.domain.po.Coupon;
import com.tianji.promotion.domain.po.UserCoupon;
import com.baomidou.mybatisplus.extension.service.IService;


public interface IUserCouponService extends IService<UserCoupon> {

    /**
     * 领取优惠券
     */
    void receiveCoupon(Long id);

    /**
     * 兑换码兑换优惠券
     */
    void exchangeCoupon(String code);

    /**
     * 检查并生成优惠券
     */
    void checkAndCreateUserCoupon(Long userId, Coupon coupon, Long serialNum);

    /**
     * 检查并生成优惠券-Redis版
     */
    void checkAndCreateUserCouponNew(UserCouponDTO msg);
}
